library function for input output operation